Fix Mouse hang with VNC
authoradsharma@los-vmm.sc.intel.com <adsharma@los-vmm.sc.intel.com>
Tue, 9 Aug 2005 19:06:44 +0000 (11:06 -0800)
committeradsharma@los-vmm.sc.intel.com <adsharma@los-vmm.sc.intel.com>
Tue, 9 Aug 2005 19:06:44 +0000 (11:06 -0800)
I've made some progress on this problem.  Turns out, the VNC emulator is
a little over aggressive in dealing with reset commands for the mouse.
Since there are commands that enable and disable the mouse the VNC
emulator provides this control.  Unfortunately, VNC also interprets
either a `reset' or `set to default' command to also disable the mouse.
This is wrong, neither of these commands are supposed to affect the
enabled status of the mouse so that, when X sends a `reset', no futher
mouse data is sent, making it look like X is hung.

Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
tools/ioemu/hw/pckbd.c

index 85863b433fe89f1ebcfcfe4ee39b365ea7fce583..b367fa678389381cb01414e1c788c4b39808ab2e 100644 (file)
@@ -704,14 +704,14 @@ int spare;
         case AUX_SET_DEFAULT:
             s->mouse_sample_rate = 100;
             s->mouse_resolution = 2;
-            s->mouse_status = 0;
+            s->mouse_status &= MOUSE_STATUS_ENABLED;
                    s->touchpad.absolute = 0;
             kbd_queue(s, AUX_ACK, 1);
             break;
         case AUX_RESET:
             s->mouse_sample_rate = 100;
             s->mouse_resolution = 2;
-            s->mouse_status = 0;
+            s->mouse_status &= MOUSE_STATUS_ENABLED;
            s->touchpad.absolute = 0;
             kbd_queue(s, AUX_ACK, 1);
             kbd_queue(s, 0xaa, 1);